<?php

namespace Biz\Resources\Site;

use Lumen\Http\Resources\Json\Resource;

/**
 * SiteVisaResource.
 *
 * @license [http://www.85do.com] [杭州永奥网络科技有限公司]
 * @copyright Copyright (c) 2018-2026 Hangzhou Yongao Technology Co., Ltd. All rights reserved.
 */
class SiteVisaResource extends Resource
{
    /**
     * Transform the resource into an array.
     *
     * @param \Illuminate\Http\Request $request
     *
     * @return array
     */
    public function toArray($request)
    {
        return [
            'uid'                => $this->uid,
            'relationship'       => $this->relationship,
            'full_name'          => $this->full_name,
            'gender'             => $this->gender,
            'birthday'           => $this->birthday,
            'nationality'        => $this->nationality,
            'passport_number'    => $this->passport_number,
            'address'            => $this->address,
            'designation_title'  => $this->designation_title,
            'issuing_country'    => $this->issuing_country,
            'duration_arrival'   => $this->duration_arrival,
            'duration_departure' => $this->duration_departure,
            'passport_front_url' => $this->passport_front_url,
            'passport_back_url'  => $this->passport_back_url,
            'status'             => $this->status,
            'created_at'         => $this->created_at->getTimestamp(),
        ];
    }
}
